package com.qijian.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.qijian.common.enums.ApprovalDescriptionEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.core.domain.BaseEntity;

import java.util.List;

/**
 * 人员分组对象 sys_user_group
 *
 * @author qijian
 * @date 2022-10-11
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("sys_user_group")
public class UserGroup extends BaseEntity{
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "${column.columnComment}")
    private Long id;

    @Excel(name = "编码")
    @ApiModelProperty(value = "编码")
    private String code;

    @Excel(name = "名称")
    @ApiModelProperty(value = "名称")
    private String name;

    @Excel(name = "父id")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "父id")
    private Long parentId;

    @Excel(name = "用户id")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "用户id")
    private Long userId;

    @Excel(name = "用户名称")
    @ApiModelProperty(value = "用户名称")
    private String nickName;

    private Integer groupType;

    @TableField(exist = false)
    private List<UserGroup> users;


}
